package exception_homework;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

public class BRDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("pw4.txt");
        InputStreamReader isr = new InputStreamReader(fis,StandardCharsets.UTF_8);
        BufferedReader br = new BufferedReader(isr);
        int d;
        while ((d= br.read())!=-1){
            System.out.print((char)d );
        }
        System.out.println("读取完毕!");
        br.close();
    }
}
